package com.xd.springaiagent.agent;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public abstract class ReActAgent extends BaseAgent {

    @Override
    protected String step() {
        boolean shouldAct = think();
        if (!shouldAct) {
            return "工作完成 -- 无需继续调用工具";
        }
        return act();
    }

    protected abstract boolean think();
    protected abstract String act();
}